package com.wisezone.demo0210;

import java.io.*;
import java.util.Properties;

public class TestPro {
    public static void main(String[] args) {
        File file=new File("E:\\Job\\Git\\java1228\\java_base\\src\\com\\wisezone\\demo0210\\db.txt");

        Properties properties=new Properties();
        properties.setProperty("url","www.baidu.com");
        properties.setProperty("user","root");
        try
        {
            OutputStream outputStream=new FileOutputStream(file);
            properties.store(outputStream,"Data config");
            System.out.println("保存完成");
        }catch (FileNotFoundException e){
            e.printStackTrace();
        }catch (IOException e){
            e.printStackTrace();
        }finally {

        }

    }
}
